<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <choice>
      <choice>
        <choice>
          <ref name="__library-elt-id2615152"/>
          <ref name="book-element-id2613963"/>
        </choice>
        <ref name="author-element-id2614058"/>
      </choice>
      <ref name="character-element-id2613924"/>
    </choice>
  </start>
  <define name="author-element-id2614058">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">author</name>
      <group>
        <group>
          <group>
            <attribute>
              <name ns="">id</name>
              <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="NMTOKEN">
                <param name="maxLength"> 16 </param>
              </data>
            </attribute>
            <ref name="name-element-id2613832"/>
          </group>
          <ref name="born-element-id2613943"/>
        </group>
        <choice>
          <empty/>
          <ref name="dead-element-id2613856"/>
        </choice>
      </group>
    </element>
  </define>
  <define name="book-element-id2613963">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">book</name>
      <interleave>
        <group>
          <group>
            <group>
              <group>
                <group>
                  <attribute>
                    <name ns="">id</name>
                    <text/>
                  </attribute>
                  <attribute>
                    <name ns="">available</name>
                    <choice>
                      <choice>
                        <value ns="http://eric.van-der-vlist.com/ns/library" type="token" datatypeLibrary="">true</value>
                        <value ns="http://eric.van-der-vlist.com/ns/library" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="token"> false </value>
                      </choice>
                      <value ns="http://eric.van-der-vlist.com/ns/library" type="token" datatypeLibrary=""> </value>
                    </choice>
                  </attribute>
                </group>
                <ref name="isbn-element-id2613872"/>
              </group>
              <ref name="title-element-id2613819"/>
            </group>
            <choice>
              <empty/>
              <oneOrMore>
                <ref name="author-element-id2614058"/>
              </oneOrMore>
            </choice>
          </group>
          <choice>
            <empty/>
            <oneOrMore>
              <ref name="character-element-id2613924"/>
            </oneOrMore>
          </choice>
        </group>
        <choice>
          <empty/>
          <oneOrMore>
            <choice>
              <choice>
                <empty/>
                <oneOrMore>
                  <attribute>
                    <anyName>
                      <except>
                        <choice>
                          <choice>
                            <nsName ns=""/>
                            <nsName ns="http://eric.van-der-vlist.com/ns/library"/>
                          </choice>
                          <nsName ns="http://eric.van-der-vlist.com/ns/person"/>
                        </choice>
                      </except>
                    </anyName>
                    <text/>
                  </attribute>
                </oneOrMore>
              </choice>
              <choice>
                <empty/>
                <oneOrMore>
                  <ref name="__-elt-id2615098"/>
                </oneOrMore>
              </choice>
            </choice>
          </oneOrMore>
        </choice>
      </interleave>
    </element>
  </define>
  <define name="born-element-id2613943">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">born</name>
      <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="date"/>
    </element>
  </define>
  <define name="character-element-id2613924">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">character</name>
      <group>
        <group>
          <group>
            <attribute>
              <name ns="">id</name>
              <text/>
            </attribute>
            <ref name="name-element-id2613832"/>
          </group>
          <ref name="born-element-id2613943"/>
        </group>
        <ref name="qualification-element-id2613840"/>
      </group>
    </element>
  </define>
  <define name="dead-element-id2613856">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">dead</name>
      <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="date"/>
    </element>
  </define>
  <define name="isbn-element-id2613872">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">isbn</name>
      <group>
        <choice>
          <empty/>
          <oneOrMore>
            <attribute>
              <anyName>
                <except>
                  <choice>
                    <choice>
                      <nsName ns=""/>
                      <nsName ns="http://eric.van-der-vlist.com/ns/library"/>
                    </choice>
                    <nsName ns="http://eric.van-der-vlist.com/ns/person"/>
                  </choice>
                </except>
              </anyName>
              <text/>
            </attribute>
          </oneOrMore>
        </choice>
        <data datatypeLibrary="" type="token"/>
      </group>
    </element>
  </define>
  <define name="name-element-id2613832">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/person">name</name>
      <data datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" type="token"/>
    </element>
  </define>
  <define name="qualification-element-id2613840">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">qualification</name>
      <text/>
    </element>
  </define>
  <define name="title-element-id2613819">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">title</name>
      <group>
        <choice>
          <empty/>
          <oneOrMore>
            <attribute>
              <anyName>
                <except>
                  <choice>
                    <choice>
                      <nsName ns=""/>
                      <nsName ns="http://eric.van-der-vlist.com/ns/library"/>
                    </choice>
                    <nsName ns="http://eric.van-der-vlist.com/ns/person"/>
                  </choice>
                </except>
              </anyName>
              <text/>
            </attribute>
          </oneOrMore>
        </choice>
        <text/>
      </group>
    </element>
  </define>
  <define name="__-elt-id2615020">
    <element>
      <anyName/>
      <choice>
        <empty/>
        <oneOrMore>
          <choice>
            <choice>
              <ref name="__-elt-id2615020"/>
              <attribute>
                <anyName/>
                <text/>
              </attribute>
            </choice>
            <text/>
          </choice>
        </oneOrMore>
      </choice>
    </element>
  </define>
  <define name="__library-elt-id2615152">
    <element>
      <name ns="http://eric.van-der-vlist.com/ns/library">library</name>
      <oneOrMore>
        <ref name="book-element-id2613963"/>
      </oneOrMore>
    </element>
  </define>
  <define name="__-elt-id2615098">
    <element>
      <anyName>
        <except>
          <choice>
            <choice>
              <nsName ns=""/>
              <nsName ns="http://eric.van-der-vlist.com/ns/library"/>
            </choice>
            <nsName ns="http://eric.van-der-vlist.com/ns/person"/>
          </choice>
        </except>
      </anyName>
      <choice>
        <empty/>
        <oneOrMore>
          <choice>
            <choice>
              <ref name="__-elt-id2615020"/>
              <attribute>
                <anyName/>
                <text/>
              </attribute>
            </choice>
            <text/>
          </choice>
        </oneOrMore>
      </choice>
    </element>
  </define>
</grammar>
